{% extends base.html %}

{% block body %}

{% init code = "" %}
{% init name = "" %}

<h3>Template Cache</h3>
<form method="get">
    <div>
        <label>Name</label>
        <input type="text" name="name" value="{{name}}"/>
        <button>查询</button>
    </div>
</form>

<ul>
{% for tname in templates %}
    <li><a href="{{_server_home}}/system/template_cache?name={{tname}}">{{tname}}</a></li>
{% end %}
</ul>

{% set lines = code.count("\n") %}
<pre class="col-md-1" >{% for l in range(1, lines+1) %}{{"%04d\n" % l}}{% end %}</pre>
<pre class="col-md-11">{{code}}</pre>

{% end %}